﻿#ifndef __AVOID_BW_CONTROL_RADIO_BOX_HEA_DIFLE_INCLUDED__
#define __AVOID_BW_CONTROL_RADIO_BOX_HEA_DIFLE_INCLUDED__
#include "ctlCheckBox.h"

namespace swui
{
#pragma warning(push)
#pragma warning(disable:4250)
	class ctlRadioBox : public ctlSelectableBox
	{
		friend class _ctlInterior::_ctlRadioSelector;
	public:
		static const ctlControlType uniqueType = ctlControlType::ctlRadioBox;
	public:
		virtual ~ctlRadioBox() { destroy(); }
		bool create(ctlRoot* parent, ctlPoint point, unsigned group, 
			const ctlText& lpszText = ctlText(L""), 
			const ctlStyleBase& = ctlStyleGradient(ctlStyleGradient::common));
		void setSelect();
		unsigned getGroup();
		unsigned allocNewGroup();
		virtual void destroy();
	protected:
		virtual void _mouse_event_(ctlMouseEvent*);
		virtual bool _judge_point_(ctlPoint);
		virtual void _redraw_(_ctlInterior::drawInfo*);
	private:
		unsigned _radio_group;
	};
#pragma warning(pop)
}

#endif